It applies more particularly to a mode of coding where blocks of pixels are each encoded based on a respective block of indexes encoded with or built from a so-called palette.
A palette in this document is defined as a look up table having entries, or “elements”, associating an index with a value of a pixel. Generally each entry comprises one or three elements as mentioned later. Each element concerns the pixel value for a color component. For example, if the image is monochrome each entry of the palette comprises one element for the unique color component.
In other words, typically, but not necessarily, the value of a pixel is constituted by the value of each colour component associated with the pixel, resulting in a colour palette. However, the value of a pixel may be made of a single pixel component (named “element”), resulting in a monochrome palette.
This mode of encoding a block of pixel is generally referred to as Palette coding mode. It is contemplated to adopt this mode, for example, in the Screen Content Coding (SCC) Extension of the High Efficiency Video Coding international standard (see document JCTVC-S1005).
When encoding an image in a video sequence, the image is first divided into coding entities (also known as “coding structures”) of pixels of equal size referred to as Coding Tree Blocks (CTBs). The CTBs may be grouped into other coding structures having a higher hierarchical level, such as slices and/or tiles. In other words, the image is recursively divided into hierarchical coding structures or coding entities.
The size of a Coding Tree Block is typically 64 by 64 pixels. Each Coding Tree Block may then be broken down into a hierarchical tree of smaller blocks whose size may vary and which are the actual blocks of pixels to encode. These smaller blocks to encode are referred to as Coding Units (CUs).
The encoding of a particular Coding Unit involves competition between predictive coding modes, including the well-known INTRA coding mode, the well-known INTER coding mode, and the Palette coding mode.
With the Palette coding mode, it is possible to define a representative block for a given Coding Unit as a block of indexes from a palette: for each pixel location in the Coding Unit, the said representative block contains the index associated with a pixel value in the Palette which is the closest to the value of the pixel having the same location (i.e. collocated) in the coding unit. However, this palette-based algorithm of selecting the closest palette entry is encoder-only in HEVC SCC: there is no need to know said algorithm in order to parse or decode a bitstream. Typically, closest means with the lowest distance using a particular metric distance such as the sum of absolute, or the square of, differences of component values. In particular, in case of lossless coding, this means the palette entry should be selected as equal to the pixel by the encoder. In the following, “correspond to” or “match” is used to mean either “is equal” when in lossless coding, or “is the closest” otherwise.
In the recent version of HEVC SCC, no residual between the original pixel block and the corresponding palette-based representative pixel block is provided. To avoid high quality decreasing in the encoded image, an “escape-coded” feature has been introduced to encode the pixels, the values of which do not match a pixel value of an entry of the Palette. This means, in lossless coding, that no palette entry is equal to the pixel value. In such case, a specific index in the Palette is used to signal an “escape-coded” pixel; and the quantized value itself of the escape-coded pixel is directly encoded in the bitstream, the quantization depending on a quantizer step transmitted at the CU-level. In case of lossless coding, the quantizer step is 0, meaning no quantization. The quantization is what is defined in the HEVC standard as the transform-bypass quantization, and the quantized values are encoded using truncated binary codes.
The Palette coding mode thus uses a current palette to build a block of indexes representative of a current coding unit or block of pixels. Entry indexes in the Palette are also known as “levels”.
When using the Palette mode, the palette and the block of indexes or “levels” is often transmitted in the bitstream encoding the image. This represents a high cost of signalling because a palette, which may comprise tens of entries, needs to be transmitted for each Coding Unit.
In Applicant's contribution in JCT-VC (No. JCTVC-Q0063 entitled “AhG10: palette predictor stuffing”, 17th Meeting: Valencia, ES, 27 Mar.-4 Apr. 2014), it has been proposed to predict the current Palette for a current Coding Unit using a palette predictor, for instance the last Palette used (for the last processed Coding Unit). This approach aims at reducing the coding costs, since a palette is no longer fully explicitly transmitted for each Coding Unit.
In addition, another proposed prediction mechanism relies on reusing the full previous palette as it is, such reuse being indicated by a flag palette_share_flag and requiring that the decoder stores the size of said palette. However, storing that palette is un-needed as it is at the start of the predictor.
However, some coding specificities may break the palette prediction scheme throughout the Coding Units of the image. This is the case of coding structures like Slices and Tiles.
The Slice and Tile coding structures have been introduced in HEVC to provide re-synchronization in case of data loss in the sequence of images (video). Note that an independent tile as defined in the HEVC standard comprises at least one slice and is spatially independent from the other tiles.
To obtain the re-synchronization property, the slices and tiles are encoded/decoded independently of each other. In other words, they are “self-contained”, meaning for instance that no INTRA prediction is performed at the boundaries of the slice or tile, and no entropy coding state or palette predictor or area for IBC (Intra Block Copy) prediction is shared with (or inherited from) a previously processed slice or tile.
The re-synchronization property thus makes data useful to prediction no longer unavailable, therefore reducing coding efficiency. In Applicant's contribution JCTVC-Q0063, the palette predictor is reset to zero when starting coding a new independent slice or tile, or even when starting coding a new line of CTBs (known as Wavefront coding) or a new image or frame. Another approach in Applicant's contribution JCTVC-Q0063 consists in resetting a set of palettes from which the palette predictor is selected, to a by-default palette which is locally (at the decoder) determined. For instance, the by-default palette is made of pixel values equally distributed over a colour space.
This approach is clearly not satisfactory, in particular with SCC where there is a high level of information redundancy within one and the same image.
Further, some coding specificities may break the palette prediction scheme throughout the Coding Units of the image. This is the case of coding structures like Slices and Tiles. As a consequence, in the contribution JCTVC-T1005 entitled “HEVC Screen Content Coding Draft Text 3”, 21st Meeting: Geneva, CH, 19-26 Feb. 2015, it has been proposed to transmit a palette predictor initializer in the Picture Parameter Set extension for the HEVC SCC Extension. According to a particular embodiment, when the entries of that initializer are monochrome, the monochrome context and/or the bitdepths of the entries components are signalled.
However signalling the colour format introduces either redundancies or potentially some incompatibilities in parameter values.